package com.example.voucher.bo;

import com.example.voucher.contract.VoucherItemAccessor;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class VoucherItemKeyOfOpppOrgTitleInvoiceAndOrderCode {

    private String oppoOrgTitleFullname;
    private String invoiceCode;
    private String invoiceNo;
    private String orderCode;

    public static VoucherItemKeyOfOpppOrgTitleInvoiceAndOrderCode of(VoucherItemAccessor data) {
        return new VoucherItemKeyOfOpppOrgTitleInvoiceAndOrderCode(data.getOppoOrgTitleFullname(), data.getInvoiceCode(),
            data.getInvoiceNo(), data.getOrderCode());
    }
}